home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / win / ch16 / 16fig05.wrl < prev    next >
Text File  |  1996-09-23  |  2KB  |  81 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright [1997] By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # A log
  8.         Transform {
  9.             translation 0.0 -0.4 0.0
  10.             rotation    0.0 0.0 1.0 -1.57
  11.             children Shape {
  12.                 appearance Appearance {
  13.                     material Material {
  14.                         diffuseColor 0.5 0.3 0.0
  15.                     }
  16.                 }
  17.                 geometry Cylinder {
  18.                     height 2.9
  19.                     radius 0.4
  20.                 }
  21.             }
  22.         },
  23.     # A set of flames
  24.         DEF Flames Shape {
  25.             # No appearance, use emissive coloring
  26.             geometry IndexedFaceSet {
  27.                 coord Coordinate {
  28.                     point [
  29.                         -0.7 0.0 0.0,  -0.8 1.5 0.0,  -1.0 0.0 0.0,
  30.                         -0.5 0.0 0.01, -0.7 1.2 0.01, -0.9 0.0 0.01,
  31.                         -0.1 0.0 0.0,  -0.2 1.6 0.0,  -0.4 0.0 0.0,
  32.                          0.3 0.0 0.01,  0.2 1.0 0.01,  0.0 0.0 0.0,
  33.                     ]
  34.                 }
  35.                 coordIndex [
  36.                     0, 1, 2, -1,  3,  4,  5, -1,
  37.                     6, 7, 8, -1,  9, 10, 11, -1
  38.                 ]
  39.                 solid FALSE
  40.                 colorPerVertex TRUE
  41.                 color Color {
  42.                     color [
  43.                         1.0 0.0 0.0,  1.0 0.5 0.0,  1.0 0.1 0.0,
  44.                         0.8 0.0 0.0,  1.0 0.9 0.0,  1.0 0.0 0.0,
  45.                     ]
  46.                 }
  47.                 colorIndex [
  48.                     3, 4, 5, 0,   0, 1, 2, 0,
  49.                     3, 4, 5, 0,   0, 1, 2, 0
  50.                 ]
  51.             }
  52.         },
  53.     # Repeat the flames to make a roaring fire
  54.         Transform {
  55.             translation 0.8 0.0 0.02
  56.             scale 1.0 1.3 1.0
  57.             children USE Flames
  58.         },
  59.         Transform {
  60.             translation 1.1 0.0 0.04
  61.             scale 1.0 0.5 1.0
  62.             children USE Flames
  63.         },
  64.         Transform {
  65.             translation -0.3 0.0 0.06
  66.             scale 1.0 1.1 1.0
  67.             children USE Flames
  68.         },
  69.         Transform {
  70.             translation -0.1 0.0 0.08
  71.             scale 1.0 0.4 1.0
  72.             children USE Flames
  73.         },
  74.         Transform {
  75.             translation 0.8 0.0 0.10
  76.             scale 1.0 1.1 1.0
  77.             children USE Flames
  78.         }
  79.     ]
  80. }
  81.